<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
    .box2{
        font-size: 40px;
        text-decoration:underline;
    }
    .box1{
        width:200px;
        overflow: hidden;
        text-overflow: ellipsis;
        /* 不换行 */
        white-space: nowrap;
    }
</style>
</head>
<body>
    <div class="box1">Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatum, mollitia! Amet eveniet dolores vitae, ipsam qui repellat inventore sunt expedita, facilis iure sint, ratione placeat voluptatibus asperiores praesentium quia veritatis?</div>
    <div class="box2">今天天气真不错</div>
</body>
</html>